#ifndef __M_LEVEL_H__
#define __M_LEVEL_H__
namespace dhylog
{
    class loglevel
    {
        public:
        enum class value
        {
            UNKNOW=0,
            DEBUG,
            INFO,
            WARN,
            ERROR,
            FATAL,
            OFF,
        };
        static const char *toString(loglevel::value level)
        {
            switch(level)
            {
            case loglevel::value::DEBUG: return "DEBUG";
            case loglevel::value::INFO: return "INFO";
            case loglevel::value::WARN: return "WARN";
            case loglevel::value::ERROR: return "ERROR";
            case loglevel::value::FATAL: return "FATAL";
            case loglevel::value::OFF: return "OFF";
            }
            return "UNKNOW";


        }

    };
}
#endif